package com.member.shop.service.impl;

import java.util.Arrays;
import java.util.List;
import javax.annotation.Resource;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Service;
import com.member.shop.mapper.SysBizRegionMapper;
import com.member.shop.domain.SysBizRegion;
import com.member.shop.service.ISysBizRegionService;

/**
 * 省市区街道数据Service业务层处理
 *
 * @author luoyun
 * @date 2025-03-19
 */
@Service
public class SysBizRegionServiceImpl extends ServiceImpl<SysBizRegionMapper, SysBizRegion> implements ISysBizRegionService
{
    @Resource
    private SysBizRegionMapper sysBizRegionMapper;

    /**
     * 查询省市区街道数据
     *
     * @param id 省市区街道数据主键
     * @return 省市区街道数据
     */
    @Override
    public SysBizRegion selectSysBizRegionById(Long id)
    {
        return sysBizRegionMapper.selectById(id);
    }

    /**
     * 查询省市区街道数据列表
     *
     * @param queryWrapper 省市区街道数据
     * @return 省市区街道数据
     */
    @Override
    public List<SysBizRegion> selectSysBizRegionList(LambdaQueryWrapper<SysBizRegion> queryWrapper)
    {
        return sysBizRegionMapper.selectList(queryWrapper);
    }
    /**
     * 查询省市区街道数据列表
     *
     * @param sysBizRegion 省市区街道数据
     * @return 省市区街道数据
     */
    @Override
    public List<SysBizRegion> selectSysBizRegionList(SysBizRegion sysBizRegion)
    {
        return sysBizRegionMapper.selectSysBizRegionList(sysBizRegion);
    }
    /**
     * 新增省市区街道数据
     *
     * @param sysBizRegion 省市区街道数据
     * @return 结果
     */
    @Override
    public int insertSysBizRegion(SysBizRegion sysBizRegion)
    {
        return sysBizRegionMapper.insert(sysBizRegion);
    }

    /**
     * 修改省市区街道数据
     *
     * @param sysBizRegion 省市区街道数据
     * @return 结果
     */
    @Override
    public int updateSysBizRegion(SysBizRegion sysBizRegion)
    {
        return sysBizRegionMapper.updateById(sysBizRegion);
    }

    /**
     * 批量删除省市区街道数据
     *
     * @param ids 需要删除的省市区街道数据主键
     * @return 结果
     */
    @Override
    public int deleteSysBizRegionByIds(Long[] ids)
    {
        return sysBizRegionMapper.deleteBatchIds(Arrays.asList(ids));
    }

    /**
     * 删除省市区街道数据信息
     *
     * @param id 省市区街道数据主键
     * @return 结果
     */
    @Override
    public int deleteSysBizRegionById(Long id)
    {
        return sysBizRegionMapper.deleteById(id);
    }
}
